package com.societyGames.codeAlong
{
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;
import flash.net.navigateToURL;

public class DonationManager
{
  public static function showDonationPage():void
  {
    var variables:URLVariables = new URLVariables();
    variables.cmd = "_donations";
    variables.add = "1";
    variables.business = "societygames@gmail.com";
    variables.item_name = "Donation to SocietyGames";
    variables.item_number = "YouCode";
    variables.tax = "0";
    variables.currency_code = "USD";
    variables.page_style = "PayPal";
    variables.no_shipping = "0";
    variables.undefined_quantity = "1";
    variables.rn = "1";
    variables.shipping = "0";
    variables.shopping_url = "http://www.societygames.com";
    var request:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");
    request.method = URLRequestMethod.POST;
    request.data = variables;
    navigateToURL(request, "_blank");
  }
}
}